package com.service.business.borrow.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.service.business.borrow.controller.rep.MemberBorrowConfigRep;
import com.service.business.borrow.controller.rep.MemberBorrowDetailsRep;
import com.service.business.borrow.controller.req.MemberBorrowAddReq;
import com.service.business.borrow.controller.req.PageMemberBorrowReq;
import com.service.core.rest.response.CommonPageRep;
import com.service.dao.enums.CoinsEnum;
import com.service.dao.model.MemberBorrow;

public interface MemberBorrowService extends IService<MemberBorrow> {


    /**
     * 获取当前可借贷的配置
     * @return
     */
    MemberBorrowConfigRep getInitConfig(int coinsId);
    /**
     * 用户借贷记录
     * @param memberBorrowAddReq
     */
    boolean addBorrow(MemberBorrowAddReq memberBorrowAddReq);

    /**
     * 获取用户借贷记录列表
     * @param req
     * @return
     */
    CommonPageRep<MemberBorrowDetailsRep> listMemberBorrowByParams(CoinsEnum coins,PageMemberBorrowReq req);

    /**
     * 获取用户借贷详情
     * @param borrowId
     * @return
     */
    MemberBorrowDetailsRep details(Integer borrowId);
}
